<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<!-- 引用一个片段 -->
<div th:replace="~{fragments/header :: header}"></div>
<h2 th:text="${userModel.title}"></h2>
<form action="/users" th:action="@{/users}" method="post" th:object="${userModel.user}">
    <input type="hidden" name="id" th:value="*{id}">
    名称：<br>
    <input type="text" name="name" th:value="*{name}"><br>
    邮箱：<br>
    <input type="text" name="email" th:value="*{email}">
    <br>
    <input type="submit" value="提交">
</form>

<!-- 引用一个片段 -->
<div th:replace="~{fragments/footer :: footer}"></div>
</body>
</html>